<template>

	<!-- Authors Table Card -->
	<a-card :bordered="false" class="header-solid h-full" :bodyStyle="{padding: 0,}"  >
		<template #title>
			<a-row type="flex" align="middle" >
				<a-col :span="24" :md="12">
					<h5 class="font-semibold m-0">用户信息列表</h5>
				</a-col>

			</a-row>

		</template>


		<a-table :columns="columns" :data-source="data" :pagination="false" >

			<template slot="user" slot-scope="user">
				<div class="table-avatar-info">
					<a-avatar shape="square" :src="user.avatar" />
					<div class="avatar-info">
						<h6>{{ user.name }}</h6>
						<p>{{ user.email }}</p>
					</div>
				</div>
			</template>

<!--			<template slot="func" slot-scope="func">-->
<!--				<div class="author-info">-->
<!--					<h6 class="m-0">{{ func.job }}</h6>-->
<!--					<p class="m-0 font-regular text-muted">{{ func.department }}</p>-->
<!--				</div>-->
<!--			</template>-->
      <template slot="reportInfo" slot-scope="reportInfo" >
        <p @click="openPage(reportInfo.link)" style="margin: 0; cursor: pointer;">{{reportInfo.data}}</p>
      </template>

			<template slot="role" slot-scope="role">
        <el-select v-model="role" placeholder="请选择">
          <el-option
              v-for="item in options"
              :key="item.value"
              :label="item.label"
              :value="item.value">
          </el-option>
        </el-select>
			</template>

<!--			<template slot="editBtn" slot-scope="row">-->
<!--				<a-button type="link" :data-id="row.key" class="btn-edit">-->
<!--					Edit-->
<!--				</a-button>-->
<!--			</template>-->

		</a-table>
	</a-card>
	<!-- / Authors Table Card -->

</template>

<style>
.header-solid{
  animation-duration:1s
}
</style>
<script>

	export default ({
		props: {
			data: {
				type: Array,
				default: () => [],
			},
			columns: {
				type: Array,
				default: () => [],
			},
		},
		data() {
			return {
				// Active button for the "Authors" table's card header radio button group.
				authorsHeaderBtns: 'all',
        role: '',
        options: [{
          value: '管理员',
          label: '管理员'
        }, {
          value: '审核员',
          label: '审核员'
        }, {
          value: '普通用户',
          label: '普通用户'
        }],

			}
		},
    methods:{
      openPage(path) {
        this.$router.push({
          path: path
        });
        console.log("11")
      },
      // updateSelect(role,index){
      //   this.$parent.tableData[index].role = this.role;
      // }
    }
	})

</script>